package trocabi.Renderer;

import java.awt.Component;
import java.awt.Font;
import javax.swing.JButton;
import javax.swing.JTable;
import javax.swing.SwingConstants;
import javax.swing.table.TableCellRenderer;

public class JButtonCellRenderer extends JButton implements TableCellRenderer {

    @Override
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {

        setHorizontalTextPosition(SwingConstants.CENTER);
        setText(value.toString());
        setFont(getFont().deriveFont(Font.BOLD));

        return this;
    }
}
